﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.OracleClient;
using Maticsoft.DBUtility;
using System.Data;
using Xiaov.SmartWeb.Application.Models;
using Xiaov.SmartWeb.Application.Excel;

namespace Xiaov.SmartWeb.Application.SZBBTree
{
  public partial class GetLockCell : System.Web.UI.Page
  {
    private string tableName = "", nf = "", dwbm = "", yf = "";
    Xiaov.SmartWeb.Application.Models.XMLVERSION modelXml = null;
    protected void Page_Load(object sender, EventArgs e)
    {
      string jsonData = "";
      if (Request.Form["tableName"] != null || Request.Form["nf"] != null || Request.Form["dwbm"] != null
         || Request.Form["yf"] != null)
      {
        tableName = Request.Form["tableName"].ToString();
        nf = Request.Form["nf"].ToString();
        yf = Request.Form["yf"].ToString();
        dwbm = Request.Form["dwbm"].ToString();
        //InitVersion();
        modelXml = new Xiaov.SmartWeb.Application.Models.XMLVERSION(nf, yf, dwbm, tableName);
        CODE_BBBMB model_bbbmb = new CODE_BBBMB(tableName);
        jsonData = "{\"lockcell\":\"" + modelXml.LOCKCELL + "\",";
        jsonData += "\"ismerge\":\"" + model_bbbmb.COORDINATES + "\"}";
        //jsonData += "\"hiderow\":\"" + modelXml.HIDDENROW + "\",";
        //jsonData += "\"hidecol\":\"" + modelXml.HIDDENCOLUMN + "\"}";
      }
      else
      {
        jsonData = "{\"lockcell\":0}";
      }
      Response.Write(jsonData);
      Response.ContentType = "text/plain";
      Response.End();
    }
  }
}